//
// Created by lz on 3/1/21.
//

#include "Poller.h"
#include "net/Channel.h"

lzweb::net::Poller::Poller(lzweb::net::EventLoop* loop)
	:ownerLoop_(loop)
{
}

lzweb::net::Poller::~Poller() = default;

bool lzweb::net::Poller::hasChannel(lzweb::net::Channel* channel) const
{
	assertInLoopThread();
	ChannelMap ::const_iterator it = channels_.find(channel->fd());

	return it!= channels_.end() && it->second == channel;
}
